<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="vendaFinanceiroForm">

        <rich:panel style="background-color: #FFFFFF;">
            <f:facet name="header">Comprador</f:facet>

        

				<fieldset id="child-dadosPessoais">
				<legend>Dados Pessoais</legend>
				
		            <ui:repeat value="#{ConsultaVenda.venda.clientesPF}" var="_pf">
		            
						<ul>
						<h:panelGrid width="100%" columns="4" border="0">
						
							<h:panelGroup>
								<h:outputText value="Nome " styleClass="name2" />
								<h:outputText value="#{_pf.nome}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="CPF " styleClass="name2" />
								<h:outputText value="#{_pf.cpf}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="RG " styleClass="name2" />
								<h:outputText value="#{_pf.rg}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Sexo: " styleClass="name2" />
								<h:outputText value="#{_pf.sexo}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="E-Mail: " styleClass="name2" />
								<h:outputText value="#{_pf.email}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Fone 01: " styleClass="name2" />
								<h:outputText value="#{_pf.fone1}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Fone 02: " styleClass="name2" />
								<h:outputText value="#{_pf.fone2}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Fone 03: " styleClass="name2" />
								<h:outputText value="#{_pf.fone3}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Endereco:" styleClass="name2" />
								<h:outputText value="#{_pf.logradouro}, #{_pf.numero} #{_pf.complemento } #{_pf.bairro}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="CEP" styleClass="name2" />
								<h:outputText value="#{_pf.cep}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Cidade" styleClass="name2" />
								<h:outputText value="#{_pf.cidade.nome}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Estado" styleClass="name2" />
								<h:outputText value="#{_pf.cidade.siglaUf}" styleClass="value2" />
							</h:panelGroup>
							
							
							
						</h:panelGrid>
						</ul>
						
					</ui:repeat>
					
		            <ui:repeat value="#{ConsultaVenda.venda.clientesPJ}" var="_pj">
		            
						<ul>
						<h:panelGrid width="100%" columns="4" border="0">
						
							<h:panelGroup>
								<h:outputText value="CNPJ" styleClass="name2" />
								<h:outputText value="#{_pj.cnpj}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Razao Social" styleClass="name2" />
								<h:outputText value="#{_pj.razaoSocial}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Nome Fantasia" styleClass="name2" />
								<h:outputText value="#{_pj.nomeFantasia}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Responsavel Legal" styleClass="name2" />
								<h:outputText value="#{_pj.cpfResponsavelLegal} - #{_pj.nomeResponsavelLegal}" styleClass="value2" />
							</h:panelGroup>
							
							
							<h:panelGroup>
								<h:outputText value="E-Mail: " styleClass="name2" />
								<h:outputText value="#{_pj.email}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Fone 01: " styleClass="name2" />
								<h:outputText value="#{_pj.fone1}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Fone 02: " styleClass="name2" />
								<h:outputText value="#{_pj.fone2}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Fone 03: " styleClass="name2" />
								<h:outputText value="#{_pj.fone3}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Endereco:" styleClass="name2" />
								<h:outputText value="#{_pj.logradouro}, #{_pf.numero} #{_pf.complemento } #{_pf.bairro}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="CEP" styleClass="name2" />
								<h:outputText value="#{_pj.cep}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Cidade" styleClass="name2" />
								<h:outputText value="#{_pj.cidade.nome}" styleClass="value2" />
							</h:panelGroup>
							
							<h:panelGroup>
								<h:outputText value="Estado" styleClass="name2" />
								<h:outputText value="#{_pj.cidade.siglaUf}" styleClass="value2" />
							</h:panelGroup>
							
							
							
						</h:panelGrid>
						</ul>
						
					</ui:repeat>
				</fieldset>
		</rich:panel>
		
        <rich:panel style="background-color: #FFFFFF;">
            <f:facet name="header">Lote</f:facet>
            
				<fieldset id="child-lotes">
				<legend>Lotes</legend>
				<ul>
            
		            <ui:repeat value="#{ConsultaVenda.venda.lotes}" var="_lote">
						<h:panelGrid width="100%" columns="10" border="0">
									<h:outputText value="Lote: " styleClass="name3" style="width: 30px; float: right;" />
									<h:outputText value="#{_lote.codigoLote}" styleClass="value2" />
									
									<h:outputText value="Quadra: " styleClass="name3" style="width: 50px; float: right;"/>
									<h:outputText value="#{_lote.quadra.codigo}" styleClass="value2" />
									
									<h:outputText value="Situacao Financeiro: " styleClass="name3" style="width: 120px; float: right;"/>
									<h:outputText value="#{_lote.statusLoteFinanceiro}" styleClass="value2" />
									
									<h:outputText value="Situacao Venda: " styleClass="name3" style="width: 100px; float: right;"/>
									<h:outputText value="#{_lote.statusLoteVenda}" styleClass="value2" />
									
									<h:outputText value="Situacao Legal: " styleClass="name3" style="width: 100px; float: right;"/>
									<h:outputText value="#{_lote.statusLoteLegal}" styleClass="value2" />
									
						</h:panelGrid>
		            </ui:repeat>
		            
	            </ul>
	            </fieldset>
				
		</rich:panel>
		
		
        <rich:panel style="background-color: #FFFFFF;">
            <f:facet name="header">Financeiro</f:facet>

				<fieldset id="child-FinanceiroEntrada">
				<legend>Entrada</legend>
				<ul>
				<h:panelGrid width="100%" columns="4" border="0">


						<h:panelGroup>
							<h:outputText value="Entrada: " styleClass="name2" />
							<h:outputText value="#{ConsultaVenda.venda.valorEntrada}" styleClass="value2" />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Forma Pagamento Entrada: " styleClass="name3" />
							<h:outputText value="#{ConsultaVenda.venda.formaPgtoEntrada}" styleClass="value2" />
						</h:panelGroup>
						
						<rich:spacer />
						<rich:spacer />
						
						<rich:spacer />
						<rich:spacer />
						<rich:spacer />
						<rich:spacer />


						<h:panelGroup>
							<h:outputText value="Banco: " styleClass="name2" rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
							<h:outputText value="#{ConsultaVenda.venda.numBancoChqEntrada}" styleClass="value2"  rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Agencia: " styleClass="name2" rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}"  />
							<h:outputText value="#{ConsultaVenda.venda.numAgenciaChqEntrada}" styleClass="value2"  rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Conta: " styleClass="name2"  rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
							<h:outputText value="#{ConsultaVenda.venda.numContaChqEntrada}" styleClass="value2"  rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
						</h:panelGroup>
												
						<h:panelGroup>
							<h:outputText value="Cheque: " styleClass="name2"  rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
							<h:outputText value="#{ConsultaVenda.venda.numChqEntrada}" styleClass="value2"  rendered="#{ConsultaVenda.venda.formaPgtoEntrada == 'CHEQUE'}" />
						</h:panelGroup>

						<rich:spacer />
						<rich:spacer />
						<rich:spacer />
						<rich:spacer />
						
					
						<h:panelGroup>
							<h:outputText value="Cheque Entrada Terceiro: " styleClass="name3"  rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}" />
							<h:outputText value="#{ConsultaVenda.venda.chqEntradaTerceiro}" styleClass="value2"  rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}"  />
						</h:panelGroup>
												
						<h:panelGroup>
							<h:outputText value="CPF terceiro: " styleClass="name2"  rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}" />
							<h:outputText value="#{ConsultaVenda.venda.cpfTerceiroChqEntrada}" styleClass="value2"  rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}" />
						</h:panelGroup>
						
												
						<h:panelGroup>
							<h:outputText value="Nome terceiro: " styleClass="name2" style="width: 80px;" rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}" />
							<h:outputText value="#{ConsultaVenda.venda.nomeTerceiroChqEntrada}" styleClass="value2"  rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}" />
						</h:panelGroup>
						
						<rich:spacer  rendered="#{ConsultaVenda.venda.chqEntradaTerceiro == 'SIM'}"  />
				
						
				</h:panelGrid>
				
				</ul>
				</fieldset>
				
				
				<fieldset id="child-CEF">
				<legend>Financiamento Parcelas Caixa Economica</legend>
				<ul>
				<h:panelGrid width="100%" columns="5" border="0" rendered="#{ConsultaVenda.venda.finanCEF == 'SIM'}" >
				
						<h:panelGroup>
							<h:outputText value="Valor Financiado:" styleClass="name3" style="width: 95px;"/>
							<h:outputText value="#{ConsultaVenda.venda.valorFinanCEF}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Data 1a Parcela:" styleClass="name3" style="width: 85px;"/>
							<h:outputText value="#{ConsultaVenda.venda.dataPrimeiraParcelaFinanCEF}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Valor Parcela:" styleClass="name3" style="width: 75px;" />
							<h:outputText value="#{ConsultaVenda.venda.valorParcelaFinanCEF}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Quantidade de Parcelas:" styleClass="name3" style="width: 130px;"/>
							<h:outputText value="#{ConsultaVenda.venda.numTotalParcelaFinanCEF}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Valor total das parcelas:" styleClass="name3" style="width: 130px;" />
							<h:outputText value="#{ConsultaVenda.venda.valorSomaParcelaFinanCEF}" styleClass="value2"  />
						</h:panelGroup>

				</h:panelGrid>
				
				<s:link view="/displayVendaParcelasCEF.xhtml" propagation="join" rendered="#{ConsultaVenda.venda.finanCEF == 'SIM' and conversation.longRunning}" >Ver Parcelas</s:link>
				<h:outputText value="Venda sem parcelas com a Caixa Economica" styleClass="value2"  rendered="#{ConsultaVenda.venda.finanCEF == 'NAO'}" />
							
				</ul>
				</fieldset>
				
				
				<fieldset id="child-Finanproprio">
				<legend>Financiamento com Cheque</legend>


				<ol>
				<a:repeat value="#{ConsultaVenda.venda.parcelasFinancimentoProprio}" var="_parcela">
					<li>
					<h:panelGrid width="100%" columns="6" border="0">
					
						<h:panelGroup>
							<h:outputText value="Valor:" styleClass="name3" style="width: 30px;"/>
							<h:outputText value="#{_parcela.valor}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Data:" styleClass="name3" style="width: 30px;"/>
							<h:outputText value="#{_parcela.dataVencimento}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Banco:" styleClass="name3" style="width: 30px;"/>
							<h:outputText value="#{_parcela.numBancoChq}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Agencia:" styleClass="name3" style="width: 40px;"/>
							<h:outputText value="#{_parcela.numAgenciaChq}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Conta:" styleClass="name3" style="width: 30px;"/>
							<h:outputText value="#{_parcela.numContaChq}" styleClass="value2"  />
						</h:panelGroup>
						
						<h:panelGroup>
							<h:outputText value="Numero cheque:" styleClass="name3" style="width: 90px;"/>
							<h:outputText value="#{_parcela.numChq}" styleClass="value2"  />
						</h:panelGroup>

						
						<h:panelGroup>
								<h:outputText value="Terceiro:" styleClass="name3" style="width: 50px;"/>
								<h:outputText value="#{_parcela.chqTerceiro}" styleClass="value2"  />
						</h:panelGroup>
						
						
						<h:panelGroup rendered="#{_parcela.chqTerceiro == 'SIM'}" >
									<h:outputText value="Nome Terceiro:" styleClass="name3" style="width: 90px;"/>
									<h:outputText value="#{_parcela.nomeTerceiro}" styleClass="value2"  />
						</h:panelGroup>

						
						<h:panelGroup  rendered="#{_parcela.chqTerceiro == 'SIM'}" >
								<h:outputText value="CPF Terceiro:" styleClass="name3" style="width: 90px;"/>
								<h:outputText value="#{_parcela.cpfTerceiro}" styleClass="value2"  />
						</h:panelGroup>
						
						<rich:spacer rendered="#{_parcela.chqTerceiro == 'SIM'}" />
						<rich:spacer rendered="#{_parcela.chqTerceiro == 'SIM'}" />
						
						<rich:spacer />
						<rich:spacer />
						
					
					</h:panelGrid>
					</li>
					<rich:separator height="2" lineType="dotted"/>
				</a:repeat>
				</ol>

				<ul>
					<h:outputText value="Venda sem parcelas com Cheque" styleClass="value2"  rendered="#{ConsultaVenda.venda.finanProprio == 'NAO'}" />
				</ul>

				
				</fieldset>
		</rich:panel>
    

				
				
    </h:form>

</ui:define>

</ui:composition>
